import Vue from 'vue'
import Vuex from 'vuex'
import login from './modules/login'
import manage from './modules/manage'
import agent from  './modules/agent'
import order from './modules/order'
import material from './modules/material'
Vue.use(Vuex)


const store = new Vuex.Store({
    state: {
      locationHeader: 'http://test.shop.51artx.com/dist/#/',
      token: '',
      //刷新相关
      needRefreshInfo: 0,
      needRefreshOutFrame: 0,
      needRefreshInFrame: 0,
      needRefreshOutCard: 0,
      needRefreshMiddleCard: 0,
      needRefreshInCard: 0,
      needRefreshSubManager: 0,
      needRefreshSubAgent: 0,
      //错误相关
      reqError: null,
      reqShake: 0,
      reqTokenFailed: 0,
      reqTokenExpire: 0,
    },
    modules: {
        login,
        manage,
        agent,
        order,
        material
    }
})
export default store
